﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Ext.Net;
using Ext.Net.MVC;
using Sharp.DataTransferObject;
using Sharp.Platform;
using Sharp.Platform.List;
using Sharp.Platform.Other;
using Alignment = Ext.Net.Alignment;
using Column= Ext.Net.MVC.ColumnAttribute;
using DateColumn = Ext.Net.MVC.DateColumnAttribute;
namespace Sharp.Web.Models
{
    [Title("员工管理")]
    [DataHandler(ModuleOP.Details, "浏览", 0)]
    [DataHandler(ModuleOP.Create, "新增", 1)]
    [DataHandler(ModuleOP.Edit, "修改", 2)]
    [DataHandler(ModuleOP.Delete, "删除", 3)]
    public partial class EmployeeIndexModel
    {
        [Column(Hidden = true)]
        public System.Guid Id { get; set; }
        /// <summary>
        /// 工号
        /// </summary>
        [Column(Width = 100, Text = "工号", Locked = true)]
        public string Number { get; set; }


        /// <summary>
        /// 全名
        /// </summary>
        [Column(Width = 140, Text = "全名", Locked = true)]
        public string FullName { get; set; }
        /// <summary>
        /// 姓名简拼
        /// </summary>
        [Column(Width = 100, Text = "简拼", Hidden = true)]
        public string Jianpin { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [TemplateColumn(Width = 100, Text = "性别")]
        public MasterDataDTO Gender { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        [NumberColumn(Width = 100, Text = "年龄", Align = Alignment.Right, Format = "0")]
        public int? Age { get; set; }
        /// <summary>
        /// 民族
        /// </summary>
        [Column(Width = 100, Text = "民族")]
        public MasterDataDTO Nation { get; set; }
        /// <summary>
        /// 身份证
        /// </summary>
        [Column(Width = 200, Text = "身份证")]
        public string IdCard { get; set; }
        /// <summary>
        /// 出生年月
        /// </summary>
        [Column(Width = 100, Text = "出生年月")]
        public string Birthday { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [Column(Width = 150, Text = "手机")]
        public string Phone { get; set; }

        /// <summary>
        /// 职称
        /// </summary>
        [Column(Width = 150, Text = "职称")]
        public MasterDataDTO Posttitle { get; set; }

        /// <summary>
        /// 职务
        /// </summary>
        [Column(Width = 150, Text = "职务")]
        public string JobTitle { get; set; }
        /// <summary>
        /// 传真
        /// </summary>
        [Column(Width = 100, Text = "传真")]
        public string Fax { get; set; }
        /// <summary>
        /// 电子邮件
        /// </summary>
        [Column(Width = 200, Text = "电子邮件")]
        public string Email { get; set; }
        /// <summary>
        /// 家庭地址
        /// </summary>
        [Column(Width = 260, Text = "家庭地址")]
        public string Address { get; set; }


        /// <summary>
        /// 户籍
        /// </summary>
        [Column(Width = 100, Text = "户籍")]
        public string RegisteredResidence { get; set; }
        /// <summary>
        /// 参加工作
        /// </summary>
        [Column(Width = 100, Text = "参加工作")]
        public string WorkDate { get; set; }
        /// <summary>
        /// 婚姻状况
        /// </summary>
        [Column(Width = 100, Text = "婚姻状况")]
        public MasterDataDTO Married { get; set; }
        /// <summary>
        /// 学历
        /// </summary>
        [Column(Width = 100, Text = "学历")]
        public MasterDataDTO EducationalBackground { get; set; }
        /// <summary>
        /// 学位
        /// </summary>
        [Column(Width = 100, Text = "学位")]
        public MasterDataDTO Degree { get; set; }
        /// <summary>
        /// 紧急联系人
        /// </summary>
        [Column(Width = 120, Text = "紧急联系人")]
        public string UrgentContact { get; set; }
        /// <summary>
        /// 紧急联系电话
        /// </summary>
        [Column(Width = 150, Text = "紧急联系电话")]
        public string UrgentPhone { get; set; }
        /// <summary>
        /// 任职状况
        /// </summary>
        [TemplateColumn(Text = "任职状况", TemplateString = "<tpl for=\".\">{PostState.Name}</tpl>")]
        public MasterDataDTO PostState { get; set; }
 
        /// <summary>
        /// 添加时间
        /// </summary>
        /// <value>添加时间</value>
        [DateColumn(Text = "添加时间", Width = 156, Format = "yyyy-MM-dd HH:mm:ss")]
        public System.DateTime? CheckInTime { get; set; }
        /// <summary>
        /// 录入员
        /// </summary>
        [Column(Width = 100, Text = "录入员")]
        public string CheckInUserName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        /// <value>修改时间</value>
        [DateColumn(Text = "修改时间", Width = 156, Format = "yyyy-MM-dd HH:mm:ss")]
        public System.DateTime? ModifiTime { get; set; }
        /// <summary>
        /// 修改员
        /// </summary>
        [Column(Width = 100, Text = "修改员")]
        public string ModifiedUserName { get; set; }
 

    }

    public partial class EmployeeIndexModel : SharpList
    {
        public EmployeeIndexModel()
        {
            this.Feature = ListFeature.MultiSelect | ListFeature.Paging | ListFeature.RowNumber;

        }
    }
}
